using UnityEngine;
using System.Collections;

public class Win : MonoBehaviour {

	#region Fields
	public Texture backgroundTexture;
	#endregion
	
	#region Properties
	#endregion
	
	#region Functions
	
	// Update the UI
	void OnGUI () 
	{
		GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), backgroundTexture);
		if (Input.anyKeyDown)
		{
			// Reset the player stats
			Player.Lifes = 3;
			Player.Score = 0;
			
			// Load the level with the next index (Level 1)
			Application.LoadLevel(GameConstants.GAME);
		}
	}
	
	#endregion
}
